package com.hui.server.util;

import java.lang.annotation.ElementType;

/**
 * @BelongsProject: yeb
 * @BelongsPackage: com.hui.server.util
 * @Author: HUI
 * @CreateTime: 2022-04-08 11:02
 * @Description: 职称的枚举类，意在客户端不需要直接传入数据库需要的 level
 */


public enum JoblevelEnum {


    PRIMARY_LEVEL("初级"),
    MIDDLE_LEVEL("中级"),
    HIGH_LEVEL("高级"),
    SENIOR_LEVEL("正高级"),
    VICE_SENIOR_LEVEL("副高级");


    private final String value;

    JoblevelEnum(String value) {
        this.value = value;
    }

    /**
     * 根据传进来的 level进行赋值
     * @param level
     * @return
     */
    public static String valueOfs(String level) {
        if (level.equalsIgnoreCase("PRIMARY"))
            return PRIMARY_LEVEL.value;

        if (level.equalsIgnoreCase("MIDDLE"))
            return MIDDLE_LEVEL.value;

        if (level.equalsIgnoreCase("HIGH"))
            return HIGH_LEVEL.value;

        if (level.equalsIgnoreCase("SENIOR"))
            return SENIOR_LEVEL.value;

        if (level.equalsIgnoreCase("VICE_SENIOR"))
            return VICE_SENIOR_LEVEL.value;


        return "";
    }

}
